home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_ORBit.idb / usr / freeware / include / ORBitutil / trace.h.z / trace.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  1.8 KB  |  68 lines

  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
  2.  
  3. /*
  4.  *  ORBit: A CORBA v2.2 ORB
  5.  *
  6.  *  Copyright (C) 1998 Richard H. Porter and Red Hat Software
  7.  *
  8.  *  This library is free software; you can redistribute it and/or
  9.  *  modify it under the terms of the GNU Library General Public
  10.  *  License as published by the Free Software Foundation; either
  11.  *  version 2 of the License, or (at your option) any later version.
  12.  *
  13.  *  This library is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  *  Library General Public License for more details.
  17.  *
  18.  *  You should have received a copy of the GNU Library General Public
  19.  *  License along with this library; if not, write to the Free
  20.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  *  Author: Dick Porter <dick@cymru.net>
  23.  *
  24.  */
  25.  
  26. #ifndef _ORBIT_TRACE_H_
  27. #define _ORBIT_TRACE_H_
  28.  
  29. #include <stdarg.h>
  30. #include "util.h"
  31.  
  32. typedef enum {
  33.     TraceMod_ORB,
  34.     TraceMod_CDR,
  35.     TraceMod_IIOP,
  36.     TraceMod_TC,
  37.     TraceMod_User
  38. } ORBit_TraceModule;
  39.  
  40. typedef enum {
  41.     TraceLevel_Alert=0,
  42.     TraceLevel_Critical,
  43.     TraceLevel_Error,
  44.     TraceLevel_Warning,
  45.     TraceLevel_Notice,
  46.     TraceLevel_Info,
  47.     TraceLevel_Debug
  48. } ORBit_TraceLevel;
  49.  
  50. extern const char *ORBit_Trace_levellist[];
  51.  
  52. #ifdef DEBUG
  53. extern void ORBit_Trace_setCallback(int (*)(char *, va_list));
  54. extern int (*ORBit_Trace_getCallback(void))(char *, va_list);
  55. extern void ORBit_Trace_setModules(int);
  56. extern void ORBit_Trace_setLevel(ORBit_TraceLevel);
  57. extern int ORBit_Trace(ORBit_TraceModule, ORBit_TraceLevel, char *, ...);
  58. #else
  59. #define ORBit_Trace_setCallback(x)
  60. #define ORBit_Trace_getCallback() NULL
  61. #define ORBit_Trace_setModules(x)
  62. #define ORBit_Trace_setLevel(x)
  63. #define ORBit_Trace(x)
  64. #endif
  65.  
  66.  
  67. #endif /* !_ORBIT_TRACE_H_ */
  68.